package com.zc.emos.wx.config;

import com.rabbitmq.client.ConnectionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 曾川
 * @version 1.0.0
 * @ClassName RabbitMQConfig.java
 * @Description RabbitMQ配置类
 *
 * 由于使用的是同步，这里需要注册给spring
 * 异步直接在yml配置即可
 * @createTime 2022年01月19日 14:10:00
 */
@Configuration
public class RabbitMQConfig {

    @Bean
    public ConnectionFactory getFactory() {
        ConnectionFactory connectionFactory = new ConnectionFactory();
        connectionFactory.setHost("192.168.1.104");
        connectionFactory.setPort(5672); //MQ端口 5672
        return connectionFactory;
    }
}
